package generalClasses;
import java.io.Serializable;
import generalClasses.ProgramData;
import java.util.*;

/**
 * Class that represents a single coupon.
 * @author
 *
 */
public class Coupon implements Serializable{

	private static final long serialVersionUID = 1L;
	private int state;
	
	private int category;
	
	private int region;
	private int id;
	private String businessName;
	private String productName;
	private String businessCity;
	private String  expirationDate;
	private int discountAmount;
	private int couponPrice;
	
	
	public Coupon(int id,int state, int category, int region, String businessName,
			String productName, String businessCity, String expirationDate,
			int discountAmount, int couponPrice) {
		super();
		this.id=id;
		this.state = state;
		this.category = category;
		this.region = region;
		this.businessName = businessName;
		this.productName = productName;
		this.businessCity = businessCity;
		this.expirationDate = expirationDate;//TODO check for conversions.
		this.discountAmount = discountAmount;
		this.couponPrice = couponPrice;
	}

	public boolean isAvailable()
	{
		if (this.state==ProgramData.STILL_AVAILABLE) return true;
		return false;
	}

	public String getBusinessName() {
		return businessName;
	}

	public String getProductName() {
		return productName;
	}

	public String getBusinessCity() {
		return businessCity;
	}

	public String getExpirationDate() {
		return expirationDate;
	}

	public int getDiscountAmount() {
		return discountAmount;
	}

	public int getCouponPrice() {
		return couponPrice;
	}

	public int getRegion() {
		return region;
	}

	public void setRegion(int region) {
		this.region = region;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getCategory() {
		return category;
	}

	public void setCategory(int category) {
		this.category = category;
	}
	
	
}
